home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- // Insert script helper for:
-
- /**
- @Object: Host
- @Method: chooseItem(...) displays a choose list dialog
- to allow a user to choose a single item from the list.
- Note the valueFunction is a callback that is used
- to get the value to put in the list box from the
- list.
- @Syntax: chooseItem(title, message, list, selectedItem, valueFunction)
- @Summary: chooseItem - brings up a choose list dialog
- */
-
- // chooseItem returns the item chosen
-
- function DoCommand()
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var selection = editor.getSelection();
- editor.replace("chooseItem(title, message, list, selectedItem, valueFunction)", selection);
- editor.setActive("Insert chooseItem");
- }
- }
-
- !!/Script
-